package videoCourse.Structure;

public class ArrayBinaryTree {
    private int[] data;

    public ArrayBinaryTree(int[] data){
        this.data = data;
    }
    public void frontShow(int index){
        if(data.length==0 || data==null){
            return;
        }
        System.out.println(data[index]);
        if( index*2+1 < data.length){
            frontShow(index*2+1);
        }
        if(index*2+2 < data.length){
            frontShow(index*2+2);
        }
    }
}
